home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 8 / CD Funhouse Version 8.0 - Wayzata Technology (7013) (1993).iso / pc / mac / __cd_fun / __sports / hyperfoo.00 / background_2687.txt < prev    next >
Text File  |  1990-10-03  |  15KB  |  588 lines

  1. -- background: 2687 from stack: in.00
  2. -- bmap block id: 3288
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openStack
  8.   hide message box
  9.   show menuBar
  10.   pass openStack
  11. end openStack
  12.  
  13. on Computer
  14.   global players, comp, team1
  15.  
  16.   if players=1 and comp is true then
  17.     if team1 is true then PickOffense
  18.     else PickDefense
  19.     exit Computer
  20.   end if
  21.   if players=1 and comp is false then
  22.     if team1 is false then PickOffense
  23.     else PickDefense
  24.   end if
  25. end Computer
  26.  
  27. on PickDefense
  28.   global def,ty
  29.  
  30.   put the random of 10 into r
  31.   if r>9 then
  32.     put the random of 99 into d
  33.     put trunc(d/17) into def
  34.   else
  35.     put 3 into def
  36.   end if
  37.   if ty<8 or ty>92 then put 6 into def
  38. end PickDefense
  39.  
  40. on PickOffense
  41.   global dwn, dir, ty, qtr, time, fdown, defcnt, lastdef, def, players
  42.  
  43.   if lastdef = def then
  44.     put defcnt+1 into defcnt
  45.   else
  46.     put 0 into defcnt
  47.   end if
  48.   put def into lastdef
  49.   put the random of 100 into off
  50.   if (defcnt>2 and players=1) then put 7 into def
  51.   if off<15 then put 7 into def
  52.   if qtr=2 or qtr>3 then
  53.     if time<25 then
  54.       if ((ty<45 and dir=1) or (ty>55 and dir=0)) then
  55.         FieldGoal
  56.         Runplay
  57.         exit PickOffense
  58.       else
  59.         Longpass
  60.         Runplay
  61.         exit PickOffense
  62.       end if
  63.     end if
  64.   end if
  65.   if dwn=4 then
  66.     if (ty>60 and dir=0) or (ty<40 and dir=1) then
  67.       put the random of 10 into dff
  68.       if qtr=5 then put 8 into dff
  69.       if dff<3 then
  70.         if dff<2 then
  71.           Screenpass
  72.           Runplay
  73.           exit PickOffense
  74.         else
  75.           Sweep
  76.           Runplay
  77.           exit PickOffense
  78.         end if
  79.       else
  80.         FieldGoal
  81.         Runplay
  82.         exit PickOffense
  83.       end if
  84.     else
  85.       Punt
  86.       exit PickOffense
  87.     end if
  88.   else
  89.     if abs(ty-fdown)<2 then
  90.       if off<40 then Shortpass
  91.       else Drawplay
  92.       Runplay
  93.       exit PickOffense
  94.     end if
  95.     if (dwn>2 and abs(ty-fdown)>10) then
  96.       if off>50 then
  97.         if abs(ty-fdown)<15 then
  98.           Screenpass
  99.         else
  100.           Longpass
  101.         end if
  102.       else
  103.         Reverse
  104.       end if
  105.       Runplay
  106.       exit PickOffense
  107.     end if
  108.     if (dwn>2 and abs(ty-fdown)<9) then
  109.       if off>50 then
  110.         Slant
  111.       else
  112.         Sweep
  113.       end if
  114.       Runplay
  115.       exit PickOffense
  116.     end if
  117.     if off<17 then Screenpass
  118.     if off>=17 and off<21 then Quickout
  119.     if off>=21 and off<29 then Endrun
  120.     if off>=29 and off<36 then Drawplay
  121.     if off>=36 and off<54 then Sweep
  122.     if off>=54 and off<58 then Longpass
  123.     if off>=58 and off<78 then Slant
  124.     if off>=78 and off<83 then Mediumpass
  125.     if off>=83 and off<92 then Shortpass
  126.     if off>=92 and off<96 then OffTackle
  127.     if off>=96 and off<=100 then Reverse
  128.     Runplay
  129.   end if
  130. end PickOffense
  131.  
  132.  
  133. on Drawplay
  134.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  135.   global pen, team1, t1r, t2r
  136.  
  137.   put "Draw Play" into play
  138.   put 0 into drop
  139.   put 0 into inc
  140.   put 0 into plytyp
  141.   put the random of 10 into tx
  142.   put 22+tx into ptime
  143.   put the random of 99 into p
  144.   put the random of 3 into x
  145.   put 0 into doff
  146.   if def=0 then put -9 into doff
  147.   if def=1 then put -6 into doff
  148.   if def=2 then put -3 into doff
  149.   if def=3 then put 0 into doff
  150.   if def=4 then put 6 into doff
  151.   if def=5 then put 11 into doff
  152.   if def=6 then put -18 into doff
  153.   if def=7 then put 30 into doff
  154.   put p+doff into p
  155.   if p>=98 then put 61+x into yop
  156.   if p>=94 and p<98 then put 19+x into yop
  157.   if p>=88 and p<94 then put 7+x into yop
  158.   if p>=67 and p<88 then put 3+x into yop
  159.   if p>=35 and p<67 then put 0+x into yop
  160.   if p>=25 and p<35 then put -2+x into yop
  161.   if p<15 then put -6+x into yop
  162.   Runup
  163. end Drawplay
  164.  
  165. on QBSneak
  166.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  167.   global pen, team1, t1r, t2r
  168.  
  169.   put "QB Sneak" into play
  170.   put 0 into drop
  171.   put 0 into inc
  172.   put 0 into plytyp
  173.   put the random of 10 into tx
  174.   put 12+tx into ptime
  175.   put the random of 99 into p
  176.   put the random of 3 into x
  177.   put 0 into doff
  178.   if def=0 then put -13 into doff
  179.   if def=1 then put -7 into doff
  180.   if def=2 then put 0 into doff
  181.   if def=3 then put 5 into doff
  182.   if def=4 then put 15 into doff
  183.   if def=5 then put 30 into doff
  184.   if def=6 then put -18 into doff
  185.   if def=7 then put 30 into doff
  186.   put p+doff into p
  187.   if p>=98 then put 33+x into yop
  188.   if p>=94 and p<98 then put 19+x into yop
  189.   if p>=88 and p<94 then put 10+x into yop
  190.   if p>=67 and p<88 then put 2 into yop
  191.   if p>=35 and p<67 then put 1 into yop
  192.   if p>=15 and p<35 then put 0 into yop
  193.   if p<15 then put -2 into yop
  194.   Runup
  195. end QBSneak
  196.  
  197.  
  198. on Sweep
  199.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  200.   global pen, team1, t1r, t2r
  201.  
  202.   put "Sweep" into play
  203.   put 0 into drop
  204.   put 0 into inc
  205.   put 0 into plytyp
  206.   put the random of 10 into tx
  207.   put 22+tx into ptime
  208.   put the random of 99 into p
  209.   put the random of 3 into x
  210.   put 0 into doff
  211.   if def=0 then put -13 into doff
  212.   if def=1 then put -8 into doff
  213.   if def=2 then put -5 into doff
  214.   if def=3 then put 0 into doff
  215.   if def=4 then put 6 into doff
  216.   if def=5 then put 11 into doff
  217.   if def=6 then put -18 into doff
  218.   if def=7 then put 30 into doff
  219.   put p+doff into p
  220.   if p>=98 then put 61+x into yop
  221.   if p>=94 and p<98 then put 33+x into yop
  222.   if p>=88 and p<94 then put 15+x into yop
  223.   if p>=67 and p<88 then put 5+x into yop
  224.   if p>=35 and p<67 then put 2+x into yop
  225.   if p>=25 and p<35 then put -4+x into yop
  226.   if p<15 then put -8+x into yop
  227.   Runup
  228. end Sweep
  229.  
  230. on OffTackle
  231.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  232.   global pen, team1, t1r, t2r
  233.  
  234.   put "Off Tackle" into play
  235.   put 0 into drop
  236.   put 0 into inc
  237.   put 0 into plytyp
  238.   put the random of 10 into tx
  239.   put 20+tx into ptime
  240.   put the random of 99 into p
  241.   put the random of 4 into x
  242.   put 0 into doff
  243.   if def=0 then put -10 into doff
  244.   if def=1 then put -8 into doff
  245.   if def=2 then put -4 into doff
  246.   if def=3 then put 0 into doff
  247.   if def=4 then put 5 into doff
  248.   if def=5 then put 10 into doff
  249.   if def=6 then put -18 into doff
  250.   if def=7 then put 30 into doff
  251.   put p+doff into p
  252.   if p>=98 then put 59+x into yop
  253.   if p>=94 and p<98 then put 23+x into yop
  254.   if p>=88 and p<94 then put 7+x into yop
  255.   if p>=67 and p<88 then put 3+x into yop
  256.   if p>=35 and p<67 then put 0+x into yop
  257.   if p>=15 and p<35 then put -2+x into yop
  258.   if p<15 then put -5+x into yop
  259.   Runup
  260. end OffTackle
  261.  
  262. on Endrun
  263.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  264.   global pen, team1, t1r, t2r
  265.  
  266.   put "End Run" into play
  267.   put 0 into drop
  268.   put 0 into inc
  269.   put 0 into plytyp
  270.   put the random of 10 into tx
  271.   put 23+tx into ptime
  272.   put the random of 99 into p
  273.   put the random of 3 into x
  274.   put 0 into doff
  275.   if def=0 then put -12 into doff
  276.   if def=1 then put -7 into doff
  277.   if def=2 then put -5 into doff
  278.   if def=3 then put 0 into doff
  279.   if def=4 then put 5 into doff
  280.   if def=5 then put 10 into doff
  281.   if def=6 then put -18 into doff
  282.   if def=7 then put 30 into doff
  283.   put p+doff into p
  284.   if p>=98 then put 51+x into yop
  285.   if p>=94 and p<98 then put 23+x into yop
  286.   if p>=88 and p<94 then put 14+x into yop
  287.   if p>=67 and p<88 then put 7+x into yop
  288.   if p>=35 and p<67 then put 0+x into yop
  289.   if p>=15 and p<35 then put -3+x into yop
  290.   if p<15 then put -6+x into yop
  291.   Runup
  292. end Endrun
  293.  
  294. on Reverse
  295.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  296.   global pen, team1, t1r, t2r
  297.  
  298.   put "Reverse" into play
  299.   put 0 into drop
  300.   put 0 into inc
  301.   put 0 into plytyp
  302.   put the random of 10 into tx
  303.   put 23+tx into ptime
  304.   put the random of 99 into p
  305.   put the random of 5 into x
  306.   put 0 into doff
  307.   if def=0 then put -20 into doff
  308.   if def=1 then put -10 into doff
  309.   if def=2 then put -5 into doff
  310.   if def=3 then put 0 into doff
  311.   if def=4 then put 8 into doff
  312.   if def=5 then put 19 into doff
  313.   if def=6 then put 30 into doff
  314.   if def=7 then put 30 into doff
  315.   put p+doff into p
  316.   if p>=98 then put 78+x into yop
  317.   if p>=94 and p<98 then put 34+x into yop
  318.   if p>=88 and p<94 then put 25+x into yop
  319.   if p>=77 and p<88 then put 14+x into yop
  320.   if p>=35 and p<77 then put -4+x into yop
  321.   if p>=15 and p<35 then put -7+x into yop
  322.   if p<15 then put -10+x into yop
  323.   Runup
  324. end Reverse
  325.  
  326. on Screenpass
  327.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  328.   global pen, team1, t1p, t2p
  329.  
  330.   put "TE Screen" into play
  331.   put 21 into drop
  332.   put 0 into inc
  333.   put 1 into plytyp
  334.   put the random of 10 into tx
  335.   put 13+tx into ptime
  336.   put the random of 99 into p
  337.   put the random of 4 into x
  338.   put 0 into doff
  339.   if def=0 then
  340.     if tx<7 then
  341.       put 30 into doff
  342.     else
  343.       put -20 into doff
  344.       put -5 into x
  345.     end if
  346.   end if
  347.   if def=1 then put 13 into doff
  348.   if def=2 then put 3 into doff
  349.   if def=3 then put 0 into doff
  350.   if def=4 then put -10 into doff
  351.   if def=5 then put -20 into doff
  352.   if def=6 then put -5 into doff
  353.   if def=7 then put 30 into doff
  354.   put p+doff into p
  355.   if p>=99 then put 37+x into yop
  356.   if p>=96 and p<99 then put 25+x into yop
  357.   if p>=81 and p<96 then put 21+x into yop
  358.   if p>=60 and p<81 then put 8+x into yop
  359.   if p>=44 and p<60 then put 3+x into yop
  360.   if p>=15 and p<44 then
  361.     put 0 into yop
  362.     put the random of 75 into inc
  363.   end if
  364.   if p<15 then put -6+x into yop
  365.   if yop<0 then put abs(yop*3) into drop
  366.   Passup
  367. end Screenpass
  368.  
  369. on Mediumpass
  370.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  371.   global pen, team1, t1p, t2p
  372.  
  373.   put "Medium In" into play
  374.   put 21 into drop
  375.   put 0 into inc
  376.   put 1 into plytyp
  377.   put the random of 10 into tx
  378.   put 15+tx into ptime
  379.   put the random of 99 into p
  380.   put the random of 4 into x
  381.   put 0 into doff
  382.   if def=0 then
  383.     if tx<7 then
  384.       put 30 into doff
  385.     else
  386.       put -20 into doff
  387.       put -5 into x
  388.     end if
  389.   end if
  390.   if def=1 then put 13 into doff
  391.   if def=2 then put 3 into doff
  392.   if def=3 then put 0 into doff
  393.   if def=4 then put -10 into doff
  394.   if def=5 then put -20 into doff
  395.   if def=6 then put -5 into doff
  396.   if def=7 then put 30 into doff
  397.   put p+doff into p
  398.   if p>=99 then put 67+x into yop
  399.   if p>=96 and p<99 then put 45+x into yop
  400.   if p>=91 and p<96 then put 31+x into yop
  401.   if p>=70 and p<91 then put 12+x into yop
  402.   if p>=54 and p<70 then put 1+x into yop
  403.   if p>=15 and p<54 then
  404.     put 0 into yop
  405.     put the random of 75 into inc
  406.   end if
  407.   if p<15 then put -6+x into yop
  408.   if yop<0 then put abs(yop*3) into drop
  409.   Passup
  410. end Mediumpass
  411.  
  412. on Longpass
  413.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  414.   global pen, team1, t1p, t2p
  415.  
  416.   put "Long Pass" into play
  417.   put 24 into drop
  418.   put 0 into inc
  419.   put 1 into plytyp
  420.   put the random of 10 into tx
  421.   put 18+tx into ptime
  422.   put the random of 99 into p
  423.   put the random of 5 into x
  424.   put 0 into doff
  425.   if def=0 then
  426.     if tx<7 then
  427.       put 30 into doff
  428.     else
  429.       put -20 into doff
  430.       put -7 into x
  431.     end if
  432.   end if
  433.   if def=1 then put 13 into doff
  434.   if def=2 then put 3 into doff
  435.   if def=3 then put 0 into doff
  436.   if def=4 then put -6 into doff
  437.   if def=5 then put -10 into doff
  438.   if def=6 then put -5 into doff
  439.   if def=7 then put 30 into doff
  440.   put p+doff into p
  441.   if p>=98 then put 67+x into yop
  442.   if p>=96 and p<98 then put 55+x into yop
  443.   if p>=91 and p<96 then put 42+x into yop
  444.   if p>=82 and p<91 then put 33+x into yop
  445.   if p>=75 and p<82 then put 19+x into yop
  446.   if p>=15 and p<75 then
  447.     put 0 into yop
  448.     put the random of 150 into inc
  449.   end if
  450.   if p<15 then put -7+x into yop
  451.   if yop<0 then put abs(yop*3) into drop
  452.   Passup
  453. end Longpass
  454.  
  455. on Quickout
  456.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  457.   global pen, team1, t1p, t2p
  458.  
  459.   put "Quick Out" into play
  460.   put 15 into drop
  461.   put 0 into inc
  462.   put 1 into plytyp
  463.   put the random of 10 into tx
  464.   put 16+tx into ptime
  465.   put the random of 99 into p
  466.   put the random of 4 into x
  467.   put 0 into doff
  468.   if def=0 then
  469.     if tx<7 then
  470.       put 30 into doff
  471.     else
  472.       put -20 into doff
  473.       put -5 into x
  474.     end if
  475.   end if
  476.   if def=1 then put 13 into doff
  477.   if def=2 then put 0 into doff
  478.   if def=3 then put 0 into doff
  479.   if def=4 then put -5 into doff
  480.   if def=5 then put -10 into doff
  481.   if def=6 then put -5 into doff
  482.   if def=7 then put 30 into doff
  483.   put p+doff into p
  484.   if p>=98 then put 40+x into yop
  485.   if p>=96 and p<98 then put 35+x into yop
  486.   if p>=91 and p<96 then put 17+x into yop
  487.   if p>=82 and p<91 then put 11+x into yop
  488.   if p>=44 and p<82 then put 3+x into yop
  489.   if p>=15 and p<44 then
  490.     put 0 into yop
  491.     put the random of 50 into inc
  492.   end if
  493.   if p<15 then put -6+x into yop
  494.   if yop<0 then put abs(yop*3) into drop
  495.   Passup
  496. end Quickout
  497.  
  498.  
  499. on Slant
  500.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  501.   global pen, team1, t1p, t2p
  502.  
  503.   put "Slant" into play
  504.   put 15 into drop
  505.   put 0 into inc
  506.   put 1 into plytyp
  507.   put the random of 10 into tx
  508.   put 12+tx into ptime
  509.   put the random of 99 into p
  510.   put the random of 4 into x
  511.   put 0 into doff
  512.   if def=0 then
  513.     if tx<7 then
  514.       put 30 into doff
  515.     else
  516.       put -20 into doff
  517.       put -5 into x
  518.     end if
  519.   end if
  520.   if def=1 then put 13 into doff
  521.   if def=2 then put 0 into doff
  522.   if def=3 then put 0 into doff
  523.   if def=4 then put -5 into doff
  524.   if def=5 then put -10 into doff
  525.   if def=6 then put -5 into doff
  526.   if def=7 then put 30 into doff
  527.   put p+doff into p
  528.   if p>=98 then put 70+x into yop
  529.   if p>=96 and p<98 then put 51+x into yop
  530.   if p>=91 and p<96 then put 15+x into yop
  531.   if p>=72 and p<91 then put 9+x into yop
  532.   if p>=44 and p<72 then put 3+x into yop
  533.   if p>=15 and p<44 then
  534.     put 0 into yop
  535.     put the random of 50 into inc
  536.   end if
  537.   if p<15 then put -6+x into yop
  538.   if yop<0 then put abs(yop*3) into drop
  539.   Passup
  540. end Slant
  541.  
  542. on Shortpass
  543.  
  544.   global ty, def, players, dir, yop, plytyp, ptime, play, drop, inc
  545.   global pen, team1, t1p, t2p
  546.  
  547.   put "Short Option" into play
  548.   put 15 into drop
  549.   put 0 into inc
  550.   put 1 into plytyp
  551.   put the random of 10 into tx
  552.   put 14+tx into ptime
  553.   put the random of 99 into p
  554.   put the random of 5 into x
  555.   put 0 into doff
  556.   if def=0 then
  557.     if tx<7 then
  558.       put 30 into doff
  559.     else
  560.       put -20 into doff
  561.       put -4 into x
  562.     end if
  563.   end if
  564.   if def=1 then put 13 into doff
  565.   if def=2 then put 2 into doff
  566.   if def=3 then put 0 into doff
  567.   if def=4 then put -7 into doff
  568.   if def=5 then put -13 into doff
  569.   if def=6 then put -5 into doff
  570.   if def=7 then put 30 into doff
  571.   put p+doff into p
  572.   if p>=98 then put 48+x into yop
  573.   if p>=96 and p<98 then put 35+x into yop
  574.   if p>=91 and p<96 then put 22+x into yop
  575.   if p>=72 and p<91 then put 4+x into yop
  576.   if p>=40 and p<72 then put 0+x into yop
  577.   if p>=15 and p<40 then
  578.     put 0 into yop
  579.     put the random of 50 into inc
  580.   end if
  581.   if p<15 then put -7+x into yop
  582.   if yop<0 then put abs(yop*3) into drop
  583.   Passup
  584.  
  585. end Shortpass
  586.  
  587.  
  588.